<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.min.css">  
<script src="/bootstrap/js/jquery-2.2.2.js"></script>  
<script src="/bootstrap/js/bootstrap.min.js"></script> 
<div id="main" class="container">
  <div class="row">
  <div class="col-lg-6 col-sm-6 col-md-6">
  <form action="${ad==null ? 'submit' : '/ad/update' }" method="post">
  <input type="hidden" name="ad.id" value="${ad.id }">
  <div class="form-group">
  <label>供应商</label>
  <input name="ad.name" value="${ad.name }" type="text" class="form-control" placeholder="请输入供应商">
  </div>
  <div class="form-group">
  <label>头像地址</label>
  <input name="ad.avatar_url" value="${ad.avatar_url }" type="text" class="form-control" placeholder="请输入头像地址">
  </div>
 <div class="form-group">
  <label>图片地址</label>
  <input name="ad.picture_url" value="${ad.picture_url }" type="text" class="form-control" placeholder="请输入图片地址">
  </div>
  <div class="form-group">
  <label>内容</label>
  <textarea name="ad.text" style="height:70px;" class="form-control" placeholder="请输入内容">${ad.text }</textarea>
  </div>
   <div class="form-group">
  <label>关键字</label>
  <input name="ad.keyword" value="${ad.keyword }" type="text" class="form-control" placeholder="请输入关键字">
  </div>
  <div style="text-align:center">
  <button type="submit" class="btn btn-primary" style="width:120px;">提交</button>
  </div>
  </form>
  </div>
  </div>
</div>
</html>